<template>
  <div>
    <h1>时间处理</h1>
    <p>生日（字符串格式）：{{ birthdayStr }}</p>
    <p>生日时间戳：{{ birthdayTimestamp }}</p>
    <p>生日格式化后时间：{{ formattedBirthday }}</p>
  </div>
</template>

<script>
import { toTimestamp } from '@/Time.js';
import formatTime from '@/Time.js'; 

export default {
  data() {
    return {
      // 个人生日字符串
      birthdayStr: '2004-01-03 09:30:00',
    };
  },
  computed: {
    birthdayTimestamp() {
      return toTimestamp(this.birthdayStr);
    },
    formattedBirthday() {
      return formatTime(this.birthdayTimestamp);
    }
  }
};
</script>